package way;

import java.util.Scanner;

public class EveryNumber {
    public static void print(int x) {
        if (x > 9) {
            print(x / 10);
        }
        System.out.println(x % 10);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        print(x);
    }
}
